| Conditions | 1 |
| Paths | 1 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | import { DeviceVisibility } from '../../../controls'; |
||
| 3 | describe( 'Responsive Utility', function() { |
||
| 4 | let $target = $( '<div class="hidden-sm">' ), |
||
| 5 | control = new DeviceVisibility( { target: $target } ), |
||
| 6 | $control = control.render(); |
||
| 7 | |||
| 8 | it( 'Creates HTML', function() { |
||
| 9 | expect( !! $control.html().length ).toEqual( true ); |
||
| 10 | } ); |
||
| 11 | |||
| 12 | it( 'Sets Default', function() { |
||
| 13 | expect( $control.find( '.checkboxes input[name="tablet-visibility"]:checked' ).length ).toEqual( 1 ); |
||
| 14 | } ); |
||
| 15 | it( 'Prevents all hidden', function() { |
||
| 16 | $control.find( '.checkboxes input' ).prop( 'checked', true ).change(); |
||
| 17 | expect( $control.find( '.checkboxes input:checked' ).length ).toEqual( 3 ); |
||
| 18 | } ); |
||
| 19 | } ); |
||
| 20 |